package org.hcyspartnoc.luoxin.common.enums.service;

import lombok.Getter;

@Getter
public enum OrderPayTypeEnum {
    WEIXIN(1, "微信支付");

    private final Integer code;
    private final String description;

    OrderPayTypeEnum(Integer code, String description) {
        this.code = code;
        this.description = description;
    }

    public static OrderPayTypeEnum getByCode(Integer code) {
        for (OrderPayTypeEnum theEnum : OrderPayTypeEnum.values()) {
            if (theEnum.getCode().equals(code)) {
                return theEnum;
            }
        }
        return null;
    }
}
